<ui:composition template="/pages/template.xhtml" 
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html">	
	
	<ui:define name="page">
	
		<!-- Appeler la méthode de préparation du formulaire avant son affichage -->	
		<f:event listener="#{clientBean.modifierClientForm}" type="preRenderView" />
	
		<h2><h:outputText value="Modifier client id #{clientBean.id}" /></h2>
						
		<h:form>
			<h:panelGrid columns="2">
			    <h:outputLabel for="nom" value="Nom" />
			    <h:inputText id="nom" value="#{clientBean.nom}" />
			                           
				<h:outputLabel for="prenom" value="Prénom" />
			    <h:inputText id="prenom" value="#{clientBean.prenom}" />
			    
			    <h:commandButton value="Mettre à jour client" action="#{clientBean.modifierClient}">
			    	<f:param name="idClient" value="#{clientBean.id}" />
			    </h:commandButton>
			</h:panelGrid>
		</h:form>
	
	</ui:define>
</ui:composition>
